package com.hspedu.innerclass;
interface  A{//接口

    void cry();
}

//演示匿名内部类的使用
public class Anonyclass {
    public static void main(String[] args) {

        Outer04 outer04 = new Outer04();
        outer04.method();
    }



}

class Outer04{//外部类

private final int n1=10;
public void method(){

  A a = new A() {

      @Override
      public void cry() {

          System.out.println("老虎在叫换");
      }


  };

  Father f= new Father("jack"){
      public void test(){


        }
    };
    System.out.println(f.name);
 //class tiger implements A{
  //  public void cry(){

   //      System.out.println();
   //  }


//}

}

}

class Father{
 String name;
    public Father(String name){

 this.name=name;
    }
    public void test(){


    }
}